<?php 
	$tr = Application_Form_FrmLanguages::getCurrentlanguage();
	$this->headTitle( $tr->translate('LOGIN') .' | '.  $tr->translate('Western University')); 
	echo $this->headTitle();
	$baseurl = Zend_Controller_Front::getInstance()->getBaseUrl();//new
?>
<script type="text/javascript">
<!--
$(document).ready(function(){
	$("#errorpanel").hide();
	<?php if(!empty($this->msg)) :?>
		$("#errorpanel").show();
	<?php endif;?>
	
	validator = $("#loginform").validate({
		invalidHandler: function() {			
		 var errors = validator.numberOfInvalids();		 
	      if (errors) {
	        var message = errors == 1
	          ? 'You missed 1 field. It has been highlighted'
	          : 'You missed ' + errors + ' fields. They have been highlighted';
	        
	        $("#errorpanel").show();			
		    $("#summary").text(message);	
	      } else {
		    
	        $("#errorpanel").hide();
	      }	    
		},	  	
		submitHandler: function(form) {
			$("#errorpanel").hide();
			form.submit();
		},
		onkeyup:false,
		rules: {
			txt_password:"required",
			txt_email: { 
                required: true, 
                email: true 
            }
		},
		messages: {
			txt_password:"Enter your password",
			txt_email: { 
                required: "Please enter a valid email address", 
                email: "Please enter a valid email address" 
            }
		},
		errorPlacement: function(error, element) {
	   		$("#summary").text(error.text());
	   		exit();
	   },	  
	   debug:true
	});
	
});
function resetform(){
	 $('#errorpanel').hide();
	 var validator = $("#myform").validate();
	 validator.resetForm();
}
//-->
</script>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Start Bootstrap - SB Admin Version 2.0 Demo</title>

    <!-- Core CSS - Include with every page -->
    <link href="<?php echo $this->baseUrl();?>/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo $this->baseUrl();?>/font-awesome/css/font-awesome.css" rel="stylesheet">

    <!-- SB Admin CSS - Include with every page -->
    <link href="<?php echo $this->baseUrl();?>/css/sb-admin.css" rel="stylesheet">

</head>

<body>

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Please Login User </h3>
                    </div>
                    <div class="panel-body">
                        <form role="form" id="loginform" action="" method="post">
                            <fieldset>
                            	<p style="text-align: center; color: red;"><?php echo $this->msg;?></p>
                                <div class="form-group input-group">
                                	<?php // echo $tr->translate("EMAIL");?>  
                                   <span class="input-group-addon"><i class="fa fa-user"></i></span>
                                   <input type="text" id="txt_email" name="txt_email" class="form-control" placeholder="Email">
                                   <span class="input-group-addon"><i class="fa fa-question-circle"></i></span>                                   
                                </div>
                                <?php //echo $tr->translate('NOT_SENSITIVE');?>
                                <div class="form-group input-group">
                                <?php //echo $tr->translate("PASSWORD");?>
                                   <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                                   <input type="password" id="txt_password" name="txt_password" class="form-control" placeholder="Password">
                                   <span class="input-group-addon"><i class="fa fa-question-circle"></i></span>                                
                                </div>
<!--                                 <div class="checkbox"> -->
                                 <?php //echo $tr->translate('SENSITIVE');?>
<!--                                     <label> -->
<!--                                         <input name="remember" type="checkbox" value="Remember Me">Remember Me -->
<!--                                     </label> -->
<!--                                 </div> -->
                                <!-- Change this to a button or input when using this as a form -->
                                <button type="submit" style="text-align: center;margin:0 0 0 90px;"  class="btn btn-lg btn-primary "><i class="fa fa-unlock"></i> Login</button>
                                <!--  <button type="reset" onclick="resetform()" class="btn btn-lg btn-primary "> Reset</button>-->
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Core Scripts - Include with every page -->
    <script src="<?php echo $this->baseUrl();?>/js/jquery-1.10.2.js"></script>
    <script src="<?php echo $this->baseUrl();?>/js/bootstrap.min.js"></script>
    <script src="<?php echo $this->baseUrl();?>/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <!-- SB Admin Scripts - Include with every page -->
    <script src="<?php echo $this->baseUrl();?>/js/sb-admin.js"></script>

</body>

</html>

